<template>
  <div class="app">
    <div class="app-content">
      <router-view />
    </div>
    <BottomNavigation />
  </div>
</template>

<script>
import BottomNavigation from './components/BottomNavigation.vue'

export default {
  name: 'App',
  components: {
    BottomNavigation
  }
}
</script>

<style>
.app {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: #f4e8ed;
  font-family: 'Courier New', monospace;
}

.app-content {
  flex: 1;
  padding-bottom: 80px; /* 为底部导航栏留出空间 */
  overflow-y: auto;
}

/* 页面容器样式 */
.page-container {
  padding: 20px;
  min-height: calc(100vh - 80px);
  max-width: 1200px;
  margin: 0 auto;
}

/* 统一的页面标题样式 */
.page-title {
  margin: 0;
  font-size: 20px;
  font-weight: 600;
  color: #333;
  text-align: center;
  flex: 1;
  text-shadow: none;
  border: none;
  background: none;
  padding: 0;
  box-shadow: none;
  text-transform: none;
  font-family: inherit;
}

/* 页面头部容器样式 */
.page-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: white;
  border-bottom: 1px solid #e5e5e5;
  border-bottom-left-radius: 20px;
  border-bottom-right-radius: 20px;
  z-index: 1000;
  padding: 20px;
}

.header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 600px;
  margin: 0 auto;
  position: relative;
}

/* 页面内容区域样式 */
.page-content {
  position: fixed;
  top: 80px;
  left: 0;
  right: 0;
  bottom: 80px;
  overflow-y: auto;
  padding: 20px;
}

/* 加载动画 */
.loading {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 200px;
  font-size: 1.2rem;
  color: #8B0000;
  font-family: 'Courier New', monospace;
  text-transform: uppercase;
  background: #FFD700;
  border: 4px solid #FF6B35;
  border-radius: 8px;
  margin: 20px;
  box-shadow: 4px 4px 0px #CC5500;
}

.loading::after {
  content: '';
  width: 20px;
  height: 20px;
  border: 2px solid #8B0000;
  border-top: 2px solid transparent;
  border-radius: 50%;
  margin-left: 10px;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* 错误状态 */
.error {
  text-align: center;
  color: white;
  padding: 20px;
  background: #FF6B35;
  border: 4px solid #8B0000;
  border-radius: 8px;
  margin: 20px;
  font-family: 'Courier New', monospace;
  text-transform: uppercase;
  box-shadow: 4px 4px 0px #CC5500;
}
</style>